package com.xuhuan.demo.excel.compare.dto;

import java.util.Objects;
import lombok.Data;

/**
 * @author: huan.xu
 * @create: 2024/1/17 21:24
 * @description:
 **/
@Data
public class ExcelLineDTO {

  private String owner;

  /**
   * 表名
   */
  private String tableName;
  /**
   * 列名
   */
  private String columnName;
  /**
   * 列描述
   */
  private String columnComment;

  public ExcelLineDTO(String owner, String tableName, String columnName,
      String columnComment) {
    this.owner = owner;
    this.tableName = tableName;
    this.columnName = columnName;
    this.columnComment = columnComment;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExcelLineDTO that = (ExcelLineDTO) o;
    return Objects.equals(tableName, that.tableName) &&
        Objects.equals(columnName, that.columnName);
  }

  @Override
  public int hashCode() {
    return Objects.hash(tableName, columnName);
  }
}
